package day18_Reflection.demo06_Reg;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

//判断是否是QQ邮箱
public class Demo04_判断QQ邮箱 {
    public static void main(String[] args) {
        String email="1234567@qq.com";
        String reg="^\\d{5,10}@qq.com$";
        Pattern compile = Pattern.compile(reg);
        Matcher matcher = compile.matcher(email);
        boolean matches = matcher.matches();
        System.out.println(matches);
    }
}
